package sz.com.postoffice.jxyzwgcase.dao.master;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import sz.com.postoffice.jxyzwgcase.dao.BaseDao;
import sz.com.postoffice.jxyzwgcase.pojo.DailyIncomeSummary;

import java.util.List;
import java.util.Map;

/**
 * @ClassName DailyIncomeSummaryDao
 * @Deacription
 * @Author jmx
 * @Date 2020/11/12 18:56
 * @Version 1.0
 **/
@Mapper
public interface DailyIncomeSummaryDao extends BaseDao<DailyIncomeSummary> {
    List<DailyIncomeSummary> queryAll(DailyIncomeSummary dailyIncomeSummary);

    Integer sumExpressCount(@Param("userCode") String userCode,
                            @Param("startTime") String startTime, @Param("endTime") String endTime);
    Integer sumStandardMailCount(@Param("userCode") String userCode,
                            @Param("startTime") String startTime, @Param("endTime") String endTime);
    Integer sumFragmentedMailCount(@Param("userCode") String userCode,
                            @Param("startTime") String startTime, @Param("endTime") String endTime);
    Integer sumDelivery(@Param("userCode") String userCode,
                            @Param("startTime") String startTime, @Param("endTime") String endTime);
    Integer sumVisit(@Param("userCode") String userCode,
                        @Param("startTime") String startTime, @Param("endTime") String endTime);

    Double sumExpressIncome(@Param("userCode") String userCode,
                          @Param("startTime") String startTime, @Param("endTime") String endTime);
    Double sumStandardMailIncomme(@Param("userCode") String userCode,
                            @Param("startTime") String startTime, @Param("endTime") String endTime);
    Double sumFragmentedMailIncome(@Param("userCode") String userCode,
                                   @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<DailyIncomeSummary> findByDeptAndDate(@Param("deptCode") String deptCode,
                                               @Param("startTime") String startTime, @Param("endTime") String endTime,
                                               @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode,
                                               @Param("countyCode") String countyCode);

    List<String> getUserListByDeptAndDate(@Param("deptCode") String deptCode,
                                          @Param("startTime") String startTime, @Param("endTime") String endTime);
    List<DailyIncomeSummary> findByUserAndDate(@Param("userCode") String deptCode,
                                               @Param("startTime") String startTime, @Param("endTime") String endTime);
    Integer getUserCountByDept(@Param("deptCode") String deptCode,
                         @Param("startTime") String startTime, @Param("endTime") String endTime);
    Integer queryDailyVisit(@Param("empCode") String empCode,
                            @Param("startTime") String startTime, @Param("endTime") String endTime);

}
